package utility;


public class CharAt {
	
	public static char strChar ='@';
	
	 public static char CharAT(String inputStr,int index)
	{		
		for(int i=0;i<inputStr.length();i++)
		{
			if(inputStr.charAt(i)=='"')
			{
			    i=inputStr.indexOf('"',i+1);
			}
			else if(i==index)
			 {
				return inputStr.charAt(index);
			 }			
		}	
		return strChar;
	}

	public static void main(String[] args) {
		
    System.out.println(CharAt.CharAT("a|bc\"de|f\"ghi",8));
		
		System.out.println(CharAt.CharAT("op.e|an\"s.h|ew\"HelLo",5));
		
	}

}
